<?php
namespace Portal\Controller;
use Common\Controller\HomebaseController;

/**
 * 首页
 */
class IndexController extends HomebaseController {

    protected $slide_model;
    protected $study_model;

    function _initialize() {
        parent::_initialize();
        $this->slide_model = D("Common/Slide");
        $this->study_model = D("Common/Study");
    }

	public function index() {
        $slides = $this->slide_model->where(array('slide_status'=>1))->field('slide_pic')->select();
        $studys = $this->study_model->where(array('study_status'=>1,'study_pic'=>array('neq','')))->field('study_name,study_pic')->select();
        $this->assign('slides',$slides);
        $this->assign('studys',$studys);
        $this->display(':index');
    }
}